package main.java.DMDE.controllers;

import javax.xml.parsers.ParserConfigurationException;

import com.mxgraph.view.mxGraph;

import main.java.DMDE.view.IDiagramView;
import main.java.DMDE.model.Class;
import main.java.DMDE.model.Interface;
import main.java.DMDE.model.Diagram;
import main.java.DMDE.model.Entity;
import main.java.DMDE.model.relationships.Relationship;
import main.java.DMDE.controllers.listeners.IDiagramEventListener;
import main.java.DMDE.controllers.listeners.IEntityEventListener;
import main.java.DMDE.controllers.listeners.IRelationshipEventListener;


public interface IDiagramController extends IEntityEventListener, IRelationshipEventListener {

    Diagram getDiagram();

    void addListener(IDiagramEventListener iDiagramEventListener);

    IDiagramView getView();

    mxGraph getGraph();

    void createRelationship();

    void createClass(String name);

    void createInterface(String name);

    boolean hasPendingClass();

    void addClass(int x, int y) throws Exception;

    void save() throws ParserConfigurationException;

    void load(Diagram diagram);

    void update(Relationship o);

    void update(Class o);

    boolean hasPendingInterface();

    void addInterface(int x, int y)throws Exception;

    void createSubDiagram(String diagramName);

    boolean deleteEntity(Entity entity);

    boolean deleteRelationship(Relationship relationship);

    void addAttributeToConvertedGraph();

    void removeListener();

    void update(Interface o);


}
